ConfigAction

constructor(titleSupplier: Supplier<Text>, activeSupplier: Supplier<Boolean>, pressAction: Runnable, decoration: Identifier, description: Text? = null, background: Identifier? = null)

Parameters

titleSupplier

Supplier - supplies a name for the button widget. Will be checked every frame, so the button name will dynamically update as needed.

activeSupplier

Supplier - supplies an active state; whether the button is insactive ("greyed out" and unclickable) or active (functioning normally)

pressAction

Runnable - the action to execute on clicking the button

background

Identifier, nullable - if non-null, will provide a custom background for the widget rendering.

decoration

Identifier, nullable - if non-null, will render a "decoration" next to the widget. These are the typically white/wireframe icons shown next to certain settings like lists.